/**
 * 
 */
package org.softTank.BC.rs.bean;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;

/**
 * @author Yuzone
 *
 */
@XmlEnum
public enum TBoolean {

	@XmlEnumValue("yes")
	YES("yes"), @XmlEnumValue("no")
	NO("no");
	private final String value;

	TBoolean(String v) {
		value = v;
	}

	public String value() {
		return value;
	}

	public static TBoolean fromValue(String v) {
		for (TBoolean c : TBoolean.values()) {
			if (c.value.equals(v))
				return c;
		}
		throw new IllegalArgumentException(v);
	}
}
